<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <search :config="searchConfig" @search="search" @getHeight="getHeight"/>

    <!-- table区域-begin -->
    <div class="page_table">
      <vxe-grid
        ref="xGrid"
        :border="true"
        :resizable="true"
        :showOverflow="true"
        size="mini"
        :loading="loading"
        :height="pageHeight-seachHeight-94"
        :align="left"
        :columns="columns"
        :data="dataSource"
        :toolbar-config="tableToolbar"
        :checkbox-config="checkboxConfig"
        v-bind="vexConfig"
        @checkbox-change="selectChangeEvent"
        @checkbox-all="selectChangeEvent"
      >
        <template #toolbar_buttons>
          <!-- 操作按钮区域 -->
          <div class="table-operator">
            <a-button type="primary" v-has="'ordermgt:export'" @click="downExportXls('difference_detail' )">导出
            </a-button>
          </div>
        </template>
        <template #pager>
          <vxe-pager
            :layouts="['Total', 'PrevJump', 'PrevPage', 'Number', 'NextPage', 'NextJump','Sizes', 'FullJump']"
            :currentPage.sync="ipagination.current"
            :page-size.sync="ipagination.pageSize"
            :total="ipagination.total"
            :pageSizes="ipagination.pageSizeOptions"
            @page-change="handlePageChange">
          </vxe-pager>
        </template>
      </vxe-grid>
    </div>
  </a-card>
</template>

<script>
import ordermgtModal from './TerminalOrderModal/ordermgtModal.vue'
import { PageListMixin } from '@/mixins/PageListMixin'
import { getAction, postAction } from '@api/manage'
import Vue from 'vue'

export default {
  name: 'userorgerl',
  mixins: [PageListMixin],
  components: {
    ordermgtModal
  },
  data() {
    return {
      selectedRowKeys: [],
      description: '用户组织关系',
      searchConfig: [
        {
          // label:'区域编号',
          type: 'input',
          name: 'orderCode',
          placeholder: ' DMS订单编号'
        }, {
          type: 'input',
          name: 'customerCode',
          placeholder: '客户编号',
        },
        {
          // label:'区域编号',
          type: 'input',
          name: 'customerName',
          placeholder: '客户名称'
        }
      ],
      //表头
      columns: [],
      //列设置
      settingColumns: [],
      columns: [
        { type: 'checkbox', width: 60, fixed: 'left' },
        {
          title: 'DMS订单编号',
          align: 'left',
          field: 'orderCode',
          minWidth: 80,
        },
        {
          title: '发货单号',
          align: 'left',
          field: 'deliverCode',
          minWidth: 80,
        },
        {
          title: '客户编号',
          align: 'left',
          field: 'customerCode',
          minWidth: 80,
        },
        {
          title: '客户名称',
          align: 'left',
          field: 'customerName',
          minWidth: 80,
        },
        {
          title: '商品编号',
          align: 'left',
          field: 'productCode',
          minWidth: 80,
        }
        , {
          title: '商品名称',
          align: 'left',
          field: 'goodsName',
          minWidth: 80,
        },
        // ,{
        //   title: '订单数量',
        //   align: 'left',
        //   field: 'quantity',
        //   minWidth: 80,
        // },
        , {
          title: '发货数量',
          align: 'left',
          field: 'deliverNum',
          minWidth: 80,
        },
        , {
          title: '发货时间',
          align: 'left',
          field: 'deliverTime',
          minWidth: 80,
        },
        {
          title: '签收数量',
          align: 'left',
          minWidth: 80,
          field: 'signForNum'
        },
        {
          title: '差异数量',
          align: 'left',
          minWidth: 80,
          field: 'deliverMissNum'
        }
      ],
      isorter: {
        permflag: 'miss_deliver_page_impl'
      },
      url: {
        list: window._CONFIG['domianDmsURL'] + '/order/orderReport/findOrderMissDeliverPageList',
      }
    }
  },
}
</script>
